<?php
class Staticizer_Index_Ranking extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select ID,Title,M_HTMLFile from News order by M_Count desc,Datetime desc limit 0,10');

        #处理数据
        foreach ($data as &$row)
        {
            $row['M_HTMLFile']=Config::PATH_RELATIVE_CONTENT_NEWS.'/'.$row['M_HTMLFile'];
        }
        
        #绑定模块
        View::Assign('News',$data);

        #生成静态
        $this->Save('index/news.ranking.html',View::Fetch('index/news.ranking.tpl'));
    }
}
?>